package com.itheima.extendsdemo;

/**
 * 2025/4/12 11:37
 */
public class TestToString {
    public static void main(String[] args) {
        Dog dog = new Dog("旺财");
        Cat cat = new Cat("小花");

        System.out.println(dog);
        System.out.println(dog.toString());
        System.out.println("-------------------");
        System.out.println(cat);
        System.out.println(cat.toString());
    }
}
